<table width="100%" cellspacing="0">
<tbody>
<tr>
  <td valign="top" bgcolor="#f0f0f0" style="width:170px"><table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
      <tr>
        <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
            <tbody>
              <tr>
                <td bgcolor="#dddddd"><span style="float: left;"><b>Project </b></span></td>
              </tr>
            </tbody>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
            <tbody>
              <tr>
                <td valign="top"><a href="<?=$this->baseUrl()?>/project">Projects</a></td>
              </tr>
            </tbody>
        </table></td>
      </tr>
    </table>
      <?php if ($this->acl->isAllowed($this->userGroup, null, "admin")) {?>
      <table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
        <tr>
          <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
              <tbody>
                <tr>
                  <td bgcolor="#dddddd"><span style="float: left;"><b>User, Groups &amp; Roles </b></span></td>
                </tr>
              </tbody>
          </table></td>
        </tr>
        <tr>
          <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
              <tbody>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/user/browse">User Browser </a></td>
                </tr>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/groups/browse">Group Browser</a></td>
                </tr>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/roles/browse">Project Role Browser </a></td>
                </tr>
              </tbody>
          </table></td>
        </tr>
      </table>
    <?php }?>
      <?php if ($this->acl->isAllowed($this->userGroup, null, "admin")) {?>
      <table width = "100%" cellpadding="0" cellspacing="0" bgcolor="#f0f0f0">
        <tr>
          <td><table border="0" cellpadding="3" cellspacing="0" width="100%" style="border-bottom:1px solid blue">
              <tbody>
                <tr>
                  <td bgcolor="#dddddd"><span style="float: left;"><b>Issue Settings </b></span></td>
                </tr>
              </tbody>
          </table></td>
        </tr>
        <tr>
          <td><table border="0" cellpadding="3" cellspacing="0" width="100%">
              <tbody>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/type/manage">Issue types</a></td>
                </tr>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/priority/manage">Priorities</a></td>
                </tr>
                <tr>
                  <td valign="top"><a href="<?=$this->baseUrl()?>/resolution/manage">Resolutions</a></td>
                </tr>
                <tr>
                  <td><a href="<?=$this->baseUrl()?>/status/manage">Statuses</a></td>
                </tr>
              </tbody>
          </table></td>
        </tr>
      </table>
    <?php }?>
  </td>
<?php if($this->auth) {?>
<?php }?>
<td valign="top">
<br>
<table width = "98%" align="center" border="0" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td colspan="2"><table width = "100%" align = "center" bgcolor="#bbbbbb" cellspacing="0" style="border:1px solid #bbbbbb">
					<tr bgcolor="#f0f0f0">
					  <td style="border-bottom:0px">
								<b style="margin:3px 0 0 5px;height:20px;"><font style="size:14px">Project:</font></b><?=$this->projectData['pname']?>
					  <br>&nbsp;					  </td>
					</tr>
					<tr>
						<td bgcolor="#ffffff">
							<div><?=$this->projectData['description']?></div>
							<div><b>Key:</b><?=$this->projectData['pkey']?></div>
							<div><b>URL:</b><?= $this->projectData['url'] ? $this->projectData['url'] : "No URL"?></div>
							<div><b>Project Team:</b></div>
							<div style="margin-left:10px">
								<div>Project Lead: <a href=""></a><?=$this->projectData['lead']?></div>
								<div>Default Assignee: Project Lead </div>
								<div>Project roles: <a href="">view members</a>							</div>						</td>
					</tr>
				</table>
				<br />
				<div align="center"><b><a href="<?=$this->baseUrl()?>/issue/openissues/pid/<?=$this->projectId?>">Browse Project</a></b> | <b><a href="<?=$this->baseUrl()?>/project/edit/projectId/<?=$this->projectId?>">Edit Project</a></b> | <b><a href="">Delete Project</a></b></div>
				<br />				</td>
				</tr>
				<tr>
					<td width="50%" align="center" valign="top">
						<table width="95%" cellspacing="1" bgcolor="#DDDDDD">
							<tr>
								<td bgcolor="#F0F0F0">
									<b>Components</b>
									<div> <a href="<?=$this->baseUrl()?>/component/add/projectId/<?=$this->projectData['id']?>">Add</a> new component</div>							  </td>
							</tr>
							<?php if($this->components) { ?>
							<tr>
								<td bgcolor="#FFFFFF">
									<table width="100%">
										<?php
										$i = 1; 
										foreach ($this->components as $component) {?>
										<tr>
											<td><a href="<?=$this->baseUrl()?>/component/openissues/projectId/<?=$this->projectId?>/cid/<?=$component['id']?>"><?=$component['cname']?></a></td>
											<td align="right">(<a href="<?=$this->baseUrl()?>/component/edit/cid/<?=$component['id']?>">Edit</a> | <a href="<?=$this->baseUrl()?>/component/delete/projectId/<?=$this->projectId?>/cid/<?=$component['id']?>">Delete</a>)&nbsp;</td>
										</tr>
										<?php }?>
									</table>							  </td>
							</tr>
							<?php } else {?>
							<tr>
								<td bgcolor="#FFFFFF">There are no components at the moment.</td>
							</tr>
							<?php }?>
					  </table>				  </td>
					<td width="50%" align="center" valign="top"><table width="95%" cellspacing="1" bgcolor="#DDDDDD">
                      <tr>
                        <td bgcolor="#F0F0F0"><b>Version</b>
                            <div> <a href="<?=$this->baseUrl()?>/version/manage/project/<?=$this->projectId?>">Manage</a> versions </div></td>
                      </tr>
                      <?php if($this->versions) { ?>
					  <tr bgcolor="#FFFFFF">
                        <td><table width="100%">
                            <?php
							$i = 1; 
							foreach ($this->versions as $version) {?>
							<tr>
                              <td><?=$version['vname']?></td>
                              <td align="right">(<a href="<?=$this->baseUrl()?>/version/edit/vid/<?=$version['id']?>">Edit</a> | <a href="<?=$this->baseUrl()?>/version/delete/vid/<?=$version['id']?>">Delete</a>)&nbsp;</td>
                            </tr>
							<?php } ?>
                        </table></td>
                      </tr>
					  <?php } else {?>
					<tr>
						<td bgcolor="#FFFFFF">There are no versions.</td>
					</tr>
					<?php }?>
                  </table></td>
				</tr>
		</tbody>
</table></td>
</tr>
</tbody>
</table>
